GXInsertPrintFilePage
You can use theGXInsertPrintFilePage
function to insert a new page in a print file.
void GXInsertPrintFilePage (gxPrintFile aPrintFile, long atPageNumber, gxFormat pageFormat, gxShape pageShape);
aPrintFile
- A reference to the print file object in whose file you want to insert a page.
atPageNumber
- The page to insert.
pageFormat
A reference to a format object for the inserted page.pageShape
- A reference to a picture shape object for the inserted page.
DESCRIPTION
TheGXInsertPrintFilePage
function inserts a page in a print file before the page number that you specify in theatPageNumber
parameter. You can pass a value of 1 in this parameter to insert the new page before all other pages in the print file. When you pass a value that is higher than the current page count, QuickDraw GX appends the page to the end of the print file.Any changes you make to a print file are not permanent until you save the print file object by calling the
GXSavePrintFile
function.SPECIAL CONSIDERATIONS
After you call theGXInsertPrintFilePage
function, do not change the page format or page shape referenced by the pageFormat and pageShape parameters. For example, if you want to change the format or shape later, make a copy, and modify the copy. Dispose of the original page or format after you make the copy.For speed and memory efficiency, dispose of the references to the format and page parameters immediately after you call
GXInsertPrintFilePage
.If a format or page can be reused, passing a clone of the object to the function is more efficient than passing a copy. For example, you can pass a clone of a page or format to replicate a page or format already in the file. The cloned object may be one that you have previously read from a print file or one that you created.
RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found, or there was not enough memory to load it. SEE ALSO
To save a print file object, see the description of theGXSavePrintFile
function on page 4-70.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help